package com.example.mymessagequeue.mqserver.mapper;

import com.example.mymessagequeue.mqserver.core.Binding;
import com.example.mymessagequeue.mqserver.core.Exchange;
import com.example.mymessagequeue.mqserver.core.MsgQueue;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 源属性
 */
@Mapper
public interface MetaMapper {

    // 建表方法
    void createExchangeTable();

    void createQueueTable();

    void createBindingTable();

    // 插入删除
    void insertExchange(Exchange exchange);

    List<Exchange> selectAllExchanges();

    void deleteExchange(String exchangeName);

    void insertQueue(MsgQueue msgQueue);

    List<MsgQueue> selectAllQueues();

    void deleteQueue(String queueName);

    void insertBinding(Binding binding);

    List<Binding> selectAllBindings();

    void deleteBinding(Binding binding);
}
